package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.demo.annotation.VerifyParam;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;

/**
 * @Description:咨询师表
 * @Date:2025-03-01
 * @author：author
*/
public class CounselorInfo implements Serializable {

	/**
	 * 咨询师ID，主键，自增
	 */
	private Long counselorId;

	/**
	 * 关联的用户ID，外键
	 */
	@VerifyParam(required = true)
	private Long userId;

	/**
	 * 真实姓名
	 */
	private String realName;

	/**
	 * 资质证书
	 */
	private String qualification;

	/**
	 * 擅长领域
	 */
	private String specialty;

	/**
	 * 个人简介
	 */
	private String introduction;

	/**
	 * 评分（0-5分）
	 */
	private BigDecimal rating;

	/**
	 * 咨询经验（年）
	 */
	private Integer experience;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 最后更新时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	private Integer status;

	private String[] specialtyArray;


	private String[] qualificationArray;

	public String[] getQualificationArray() {
		if (StringUtils.isEmpty(qualification)) {
			return new String[0];
		}else  {
			return qualification.split(",");
		}
	}

	public void setQualificationArray(String[] qualificationArray) {
		this.qualificationArray = qualificationArray;
	}

	public String[] getSpecialtyArray() {
		if (StringUtils.isEmpty(specialty)) {
			return new String[0];
		}else  {
			return specialty.split(",");
		}
	}



	public void setSpecialtyArray(String[] specialtyArray) {
		this.specialtyArray = specialtyArray;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public void setCounselorId(Long counselorId) {
		this.counselorId = counselorId;
	}

	public Long getCounselorId() {
		return this.counselorId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getRealName() {
		return this.realName;
	}

	public void setQualification(String qualification) {
		this.qualification = qualification;
	}

	public String getQualification() {
		return this.qualification;
	}

	public void setSpecialty(String specialty) {
		this.specialty = specialty;
	}

	public String getSpecialty() {
		return this.specialty;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getIntroduction() {
		return this.introduction;
	}

	public void setRating(BigDecimal rating) {
		this.rating = rating;
	}

	public BigDecimal getRating() {
		return this.rating;
	}

	public void setExperience(Integer experience) {
		this.experience = experience;
	}

	public Integer getExperience() {
		return this.experience;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	@Override
	public String toString() {
		return "咨询师ID，主键，自增:" + counselorId + ",关联的用户ID，外键:" + userId + ",真实姓名:" + realName + ",资质证书:" + qualification + ",擅长领域:" + specialty + ",个人简介:" + introduction + ",评分（0-5分）:" + rating + ",咨询经验（年）:" + experience + ",创建时间:" + createTime + ",最后更新时间:" + updateTime + "";
	}

}